package org.example.demo14_observe;

public class Alarm implements ResponseDevice{

    @Override
    public void update(int temperature) {
        if (temperature > 50) {
            System.out.println("Alarm is on!");
        }else{
            System.out.println("Alarm is off.");
        }

    }
}
